package com.yidu.qx.domain;

import javax.persistence.*;
import java.util.Objects;
import java.util.Set;

/**
 * @program: ssh
 * @description:
 * @author: 张超
 * @create: 2019-09-18 16:35
 */
@Entity
@Table(name = "flower_type", schema = "flower_db", catalog = "")
public class FlowerTypeEntity {
    private Integer typeId;
    private String typeName;
    private String flowerText;

    private Set<FlowerEntity> set;

    public Set<FlowerEntity> getSet() {
        return set;
    }

    public void setSet(Set<FlowerEntity> set) {
        this.set = set;
    }

    @Id
    @Column(name = "type_id")
    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    @Basic
    @Column(name = "type_name")
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Basic
    @Column(name = "flower_text")
    public String getFlowerText() {
        return flowerText;
    }

    public void setFlowerText(String flowerText) {
        this.flowerText = flowerText;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FlowerTypeEntity that = (FlowerTypeEntity) o;
        return Objects.equals(typeId, that.typeId) &&
                Objects.equals(typeName, that.typeName) &&
                Objects.equals(flowerText, that.flowerText);
    }

    @Override
    public int hashCode() {
        return Objects.hash(typeId, typeName, flowerText);
    }

    public FlowerTypeEntity(Integer typeId, String typeName, String flowerText, Set<FlowerEntity> set) {
        this.typeId = typeId;
        this.typeName = typeName;
        this.flowerText = flowerText;
        this.set = set;
    }

    public FlowerTypeEntity() {
    }
}